#!/usr/bin/env python
# encoding: utf-8
"""
@Author: Beam
@Mail:506556658@qq.com
@file: 域名解析.py
@time: 2017/5/10 16:36
"""

import resolver


def main():
    domain = input('Enter an domain:')
    A = resolver.query(domain, 'A')  # 指定查询类型为A记录
    for i in A.response.answer:  # 通过response.answer方法获取查询回应信息
        for j in i.items:
            print(j)


if __name__ == '__main__':
    main()